/****** Object:  Stored Procedure [dbo].spChiTietBienBanNhapHangUpdate Script Date: 7/16/2012 ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[spChiTietBienBanNhapHangUpdate]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
	DROP PROCEDURE [dbo].[spChiTietBienBanNhapHangUpdate]
GO

/******************************************************************************
**		Change History
*******************************************************************************
**		Date:		Author:					Description:
**		--------	--------				-----------------------------------
**		17/07/2012	SongTM					Innit created
*******************************************************************************/

CREATE PROCEDURE [dbo].[spChiTietBienBanNhapHangUpdate]
(
	@MaBBNH nvarchar(12),
	@MaCTPN nvarchar(12),
	@ThucTe int,
	@Thua int,
	@Thieu int,
	@Hong int,
	@TinhTrang nvarchar(50),
	@GhiChu nvarchar(200)
)

WITH ENCRYPTION

AS

SET NOCOUNT ON

UPDATE [tbl_ChiTietBienBanNhapHang]
SET [ThucTe] = @ThucTe,
	[Thua] = @Thua,
	[Thieu] = @Thieu,
	[Hong] = @Hong,
	[TinhTrang] = @TinhTrang,
	[GhiChu] = @GhiChu
WHERE	[MaBBNH] = @MaBBNH	AND [MaCTPN] = @MaCTPN
GO

--GRANT EXECUTE ON [dbo].[spChiTietBienBanNhapHangUpdate] TO [sa]
--GO
